/**
 * Created by qintao30057 on 2017/3/13.
 */

$(function () {

})

function doOnFormInit2() {
    if(typeof(editForm2) != 'object') return;
    editForm2.setReadonly('functionName',true);
    editForm2.setReadonly('telephone',true);
    editForm2.setReadonly('content',true);
    editForm2.setItemValue("functionName",parent.oneSQDInfo.function_name);
    editForm2.setItemValue("telephone",parent.oneSQDInfo.telephone);
    editForm2.setItemValue("content",parent.oneSQDInfo.content);
}

function doOnFormInit1() {
    if(typeof(editForm1) != 'object') return;

    $(editForm1.getInput("disposeResult")).attr("maxlength",500);

    var disposeWay_combo = editForm1.getCombo("disposeWay");
    disposeWay_combo.addOption(parent.disposeWayComboData);
    disposeWay_combo.deleteOption('');
    disposeWay_combo.setComboValue(parent.oneSQDInfo.dispose_way);
    disposeWay_combo.readonly(true);

    var status_combo = editForm1.getCombo("status");
    status_combo.addOption(parent.serviceStatusComboData);
    status_combo.setComboValue(parent.oneSQDInfo.dispose_status);
    status_combo.readonly(true);

    editForm1.setItemValue("disposeResult",parent.oneSQDInfo.dispose_result);

    editForm1.setReadonly('disposeResult',true);
    editForm1.setReadonly('disposeWay',true) ;
    editForm1.setReadonly('status',true) ;
}

function doOnButtonForm() {
    if (typeof(buttonForm) != 'object') return;

    buttonForm.attachEvent("onButtonClick", function(name, command) {
        switch(command) {
            case 'cancle':doCancle();break;
        }
    });
}

function doCancle() {
    parent.infoWin.close();
}